<template>
	<view>
		<!-- 首页页面组件 -->
		<!-- <Page ref="ic" :items="items" :shopOpacity.sync="shopOpacity" /> -->
		<!-- #ifdef APP-PLUS -->
		<Update></Update>
		<!-- #endif -->
		<!-- 全端解决方案 -->
		<!-- <svg-icon id="cherry" name="huangguan"></svg-icon> -->
		<!-- h5解决方案 -->
		<!-- <sl-svg icon-class="huangguan" class-name="icon" /> -->
		<Page :items="items" />
	</view>
</template>

<script>
	import Share from '@/components/mixins/share';
	import Page from '@/pages/shop/page.vue';
	import Update from '@/pages/components/update/update.vue'
	export default {
		//
		name: 'shopIndex',
		mixins: [Share],
		//
		components: {
			Page,
			Update
		},
		data() {
			return {
				options: {},
				//页面元素
				items: {},
				shopOpacity: '0'
			};
		},
		//
		onLoad(options) {
			this.options = options;
		},
		//
		onShow() {
			this.getPageData();
		},
		//nvue暂不支持滚动监听，可用bindingx代替
		// onPageScroll: function(e) { 
		// 	console.log('e: ',e);
		// 	if (e.scrollTop < 100) {
		// 		this.shopOpacity = e.scrollTop / 100
		// 		console.log('this.shopOpacity: ',this.shopOpacity);
		// 	}
		// },
		methods: {
			//
			getPageData() {
				this.items = {
					search: {
						name: 'search'
					},
					category: {
						name: 'category'
					},
					goods: {
						name: 'goods'
					}
				};
			}
		},
	};
</script>

<style lang="scss" scoped></style>